aviutl2\generic\binding/
mod.rs1use crate::common::{AnyResult, AviUtl2Info};
2
3#[derive(Debug, Clone)]
5pub struct FilterPluginTable {
6 pub information: String,
9}
10
11pub trait GenericPlugin: Send + Sync + Sized {
14 fn new(info: AviUtl2Info) -> AnyResult<Self>;
16
17 fn register(&mut self, registry: &mut self::host_app::HostAppHandle);
19
20 fn on_project_load(&mut self, _project: &mut crate::generic::ProjectFile) {}
24
25 fn on_project_save(&mut self, _project: &mut crate::generic::ProjectFile) {}
27
28 fn on_clear_cache(&mut self, _edit_section: &crate::generic::EditSection) {}
30
31 fn on_change_scene(&mut self, _edit_section: &crate::generic::EditSection) {}
33
34 fn with_instance<R>(f: impl FnOnce(&Self) -> R) -> R
40 where
41 Self: crate::generic::__bridge::GenericSingleton,
42 {
43 <Self as crate::generic::__bridge::GenericSingleton>::with_instance(f)
44 }
45
46 fn with_instance_mut<R>(f: impl FnOnce(&mut Self) -> R) -> R
52 where
53 Self: crate::generic::__bridge::GenericSingleton,
54 {
55 <Self as crate::generic::__bridge::GenericSingleton>::with_instance_mut(f)
56 }
57}
58
59mod project;
60pub use project::*;
61mod edit_section;
62pub use edit_section::*;
63mod host_app;
64pub use host_app::*;